// 定义一些全局的class
@import './variable.less';
// ** 自定义滚动条 **
// 用法：给需要滚动的标签添加.show-scrolly
.show-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  &::-webkit-scrollbar-corner {
    background: #09172c;
  }
  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background-color: rgb(42, 71, 85, .4);
    border-radius: 0.25rem;

    &:hover {
      // 放上底
      background-color: rgb(42, 71, 85, 1);

    }
  }
  &::-webkit-scrollbar-track{
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
    border-radius: 0.25rem;
    background-color: rgb(42, 71, 85, .4);
  }

  &::-webkit-scrollbar-thumb:vertical {
    border: none !important;
    outline: none !important;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(13, 198, 155, 0.2);

    &:hover {
      // 放上条
      // 滚动条颜色加深
      background: rgba(13, 198, 155, 0.8);

    }
  }
  &::-webkit-scrollbar-track-piece {
    background: transparent !important;
  }
}

// 浅色滚动条颜色
.show-scroll-light {
  overflow-y: auto;
  overflow-x: hidden;
  &::-webkit-scrollbar {
    display: none;
  }
  &:hover {
    &::-webkit-scrollbar {
      display: inline;
      width: 6px;
      height: 6px;
      background: rgba(66, 209, 111, .1);
      border-radius: 0.25rem;
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 8px;
      background-color: rgba(13, 198, 155, .7);

    }
  }
}

// 浅色Y轴滚动条颜色
.show-scroll-light-y {
  overflow-y: hidden;
  overflow-x: auto;

  &::-webkit-scrollbar {
    display: none;
  }

  &:hover {
    &::-webkit-scrollbar {
      display: inline;
      width: 6px;
      height: 6px;
      background: rgba(66, 209, 111, .1);
      border-radius: 0.25rem;
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 8px;
      background-color: rgba(13, 198, 155, .7);

    }
  }
}

// ** 超出文本用省略号代替 **
.ellipsis {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

// ** aqi 指标颜色值 **
.aqi-color-1 {
  color: @aqiColor1;
}

.aqi-color-2 {
  color: @aqiColor2;
}

.aqi-color-3 {
  color: @aqiColor3;
}

.aqi-color-4 {
  color: @aqiColor4;
}

.aqi-color-5 {
  color: @aqiColor5;
}

.aqi-color-6 {
  color: @aqiColor6;
}

.aqi-bg-color-1 {
  background-color: @aqiColor1;
}

.aqi-bg-color-2 {
  background-color: @aqiColor2;
}

.aqi-bg-color-3 {
  background-color: @aqiColor3;
}

.aqi-bg-color-4 {
  background-color: @aqiColor4;
}

.aqi-bg-color-5 {
  background-color: @aqiColor5;
}

.aqi-bg-color-6 {
  background-color: @aqiColor6;
}

// 常用的盒子大体样式
.commonBox {
  // opacity: 0.48;
  border-radius: 5px;
  background-color: rgba(1, 16, 38, 0.48);
  //position: relative;

  .bgImg {
    width: 20px;
    height: 20px;
    position: absolute;

    &>img {
      width: 20px;
      height: 20px;
    }

    &:nth-child(1) {
      left: 0;
      top: 0;
    }

    &:nth-child(2) {
      right: 0;
      top: 0;
      transform: rotate(90deg);
    }

    &:nth-child(3) {
      right: 0;
      bottom: 0;
      transform: rotate(180deg);
    }

    &:nth-child(4) {
      left: 0;
      bottom: 0;
      transform: rotate(270deg);
    }
  }
}

.commonBox-l {
  // opacity: 0.48;
  border-radius: 5px;
  background-color: rgba(1, 16, 38, 0.48);
  position: relative;
  &::before {
    content: '';
    display: inline-block;
    width: 371px;
    height: 7px;
    // background: url("~_img/vehicle/comBox-border-light.png") no-repeat;
    background-size: 100% 100%;
    position: absolute;
    right: 0;
    bottom: 3px;
  }

  .bgImg {
    width: 20px;
    height: 20px;
    position: absolute;

    &>img {
      width: 20px;
      height: 20px;
    }

    &:nth-child(1) {
      left: 6px;
      top: 6px;
    }

    &:nth-child(2) {
      right: 6px;
      top: 6px;
      transform: rotate(90deg);
    }

    &:nth-child(3) {
      right: 6px;
      bottom: 6px;
      transform: rotate(180deg);
    }

    &:nth-child(4) {
      left: 6px;
      bottom: 6px;
      transform: rotate(270deg);
    }
  }
}

.routerComBox {
  width: 100%;
  height: 100%;
  // background: url("~_img/common/router-viewer-bg.png") no-repeat;
  background-size: 100% 100%;
  position: relative;
  &::before {
    content: '';
    display: inline-block;
    width: 775px;
    height: 7px;
    // background: url("~_img/vehicle/comBox-border-light-l.png") no-repeat;
    background-size: 100% 100%;
    position: absolute;
    right: 160px;
    bottom: 3px;
  }

  .bgImg {
    width: 20px;
    height: 20px;
    position: absolute;

    &>img {
      width: 20px;
      height: 20px;
    }

    &:nth-child(1) {
      left: 6px;
      top: 6px;
    }

    &:nth-child(2) {
      right: 6px;
      top: 6px;
      transform: rotate(90deg);
    }

    &:nth-child(3) {
      right: 6px;
      bottom: 6px;
      transform: rotate(180deg);
    }

    &:nth-child(4) {
      left: 6px;
      bottom: 6px;
      transform: rotate(270deg);
    }
  }
}

// 常用的标题颜色渐变
.commonTitlelinear {
  margin-top: 10px;
  display: flex;

  div {
    &:nth-child(1) {
      width: 5px;
      height: 28px;
      background: rgba(13, 203, 158, 1);
      border-radius: 2px;
      margin-right: 4px;
    }

    &:nth-child(2) {
      flex: 1;
      height: 28px;
      line-height: 28px;
      padding-left: 10px;
      background: linear-gradient(-90deg,
          rgba(46, 138, 98, 0),
          rgba(13, 203, 158, 1));
      border-radius: 3px 0px 0px 3px;
      color: #041932;
      font-size: @textSize6;
      font-weight: bold;
    }
  }
}

// 常用字体悬浮颜色变化
.commonTextHover {

    &:hover {
      cursor: pointer;
      // background: lighten(rgba(101, 146, 138, 0.4), 10%);
      color: lighten(@lessGreen, 10%);
      transition: all ease-in 0.2s;
      text-shadow: 0 0 5px @lessGreen;
    }

}

// 表单必填项目星号*
.required {
  position: relative;

  &::before {
    content: "*";
    color: red;
    position: absolute;
    left: -12px;
  }
}

.backstage-form {
  font-size: 30px;

  .ivu-form-item {
    display: flex;

    .ivu-form-item-label {
      width: 150px;
      text-align: right;
      font-size: 16px;
      font-family: PingFang SC;
      font-weight: 400;
      color: rgba(201, 229, 223, 1) // width: auto !important;
    }

    .ivu-form-item-content {
      flex: 1;

      /deep/.ivu-form-item-error-tip {
        padding-top: 2px !important;
      }
      .ivu-row {
        .ivu-col {
          margin-right: 10px;
        }
      }
    }


  }


}

.span-hover { //表格操作栏颜色
  color: #00e0e3 !important;
  transition: color .2s ease-in-out;
  &:hover {
    color: #0dc69b !important;
  }
}